projects
/
openwrt
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2409530
)
ar71xx: ar934x_nfc: fix memory initialization bug
author
Gabor Juhos
<
[email protected]
>
Wed, 12 Mar 2014 12:52:36 +0000
(12:52 +0000)
committer
Gabor Juhos
<
[email protected]
>
Wed, 12 Mar 2014 12:52:36 +0000
(12:52 +0000)
sizeof(array_from_function_definition) gives back the size of the pointer.
sizeof(type) * array_size should be used in memset.
Signed-off-by: David Völgyes <
[email protected]
>
Patchwork: http://patchwork.openwrt.org/patch/4950/
Signed-off-by: Gabor Juhos <
[email protected]
>
SVN-Revision: 39890
target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
patch
|
blob
|
history
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
b/target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
index d140cd0eab1f878541e8afb63e092c63696524e5..9b5256ecc214978605d4ca74de3d38d924ad0f7e 100644
(file)
--- a/
target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
+++ b/
target/linux/ar71xx/files/arch/mips/ath79/dev-nfc.c
@@
-43,7
+43,7
@@
static void __init ath79_nfc_init_resource(struct resource res[2],
unsigned long size,
int irq)
{
- memset(res, 0, sizeof(
res)
);
+ memset(res, 0, sizeof(
struct resource) * 2
);
res[0].flags = IORESOURCE_MEM;
res[0].start = base;